<template>
	<!-- 提交订单 -->
	<view class="bady">
		<view class="head">
			<view class="tab flex-cb">
				<view :class="{wl:tab==0}" @click="tab=0">{{serverType==3?'物流':'商家'}}配送</view>
				<view :class="{wl:tab==1}" @click="tab1">自提</view>
			</view>
			<view class="address flex-cb bg-white" v-if="tab==0" @click="godizhi">
				<view class="name_phone" @click="geto">
					<text>{{defaultAddress.name}}</text>
					<text class="phone">{{defaultAddress.phone}}</text>
					<view class="Add_address">
						{{defaultAddress.province+defaultAddress.city+defaultAddress.district+defaultAddress.address || '去设置地址'}}
					</view>
				</view>
				<view class="flex-c icon">
					<text class="cuIcon-right"></text>
				</view>
			</view>
			<view class="head_1 bg-white flex-cb" v-if="tab == 1">
				<view class="head_div">
					<view class="address">{{shop.shop_province+shop.shop_city+shop.shop_district+shop.shop_address}}
					</view>
					<view class="name_people flex-cb">
						<view class="left">
							<view class="people">自取时间</view>
							<picker ref="picker" mode="time" v-model="time" @change="handleTime">
								<text class="name_phone">{{time?t+' '+ time:'请填写自取时间'}}</text>
							</picker>
						</view>
						<view class="right">
							<view class="people">联系方式</view>
							<text class="name_phone">{{shop.contact_phone}}</text>
						</view>
					</view>
				</view>
				<map :latitude="shop.lat" :longitude="shop.lng" :markers="covers" @click="handlemap"></map>
			</view>
		</view>
		<!-- 		<view class="head" style="height: auto;margin: 20rpx 0;">
			<view class="address flex-cb bg-white" v-if="tab==0">
				<view class="name_phone" @click="geto">
					<text>{{defaultAddress.name}}</text>
					<text class="phone">{{defaultAddress.phone}}</text>
					<view class="Add_address">
						{{defaultAddress.province+defaultAddress.city+defaultAddress.district+defaultAddress.address}}
					</view>
				</view>
				<view class="flex-c icon">
					<text class="cuIcon-right"></text>
				</view>
			</view>
		</view> -->
		<view class="main">
			<view v-for="(item,index) in food" :key="index" class="item flex">
				<image :src="item.goods_image?url+item.goods_image:item.main_images" mode=""></image>
				<view class="text_div">
					<view class="name flex-cb ">
						<text
							class="text">{{item.goods_title + item.goods_spec_item_name?item.goods_title + item.goods_spec_item_name:item.name+item.spec}}</text>
						<!-- <text class="tuikuan" v-if="index == isshow"></text> -->
						<text class="jifen">原价:
							<text>
								<text class="icon">￥</text>{{item.goods_price?item.goods_price:item.price}}
							</text>
						</text>
					</view>
					<view class="pic flex justify-between">
						<text class="">规格：
							<text class="num_x">X{{item.number}}</text>
						</text>
						<text class="vip">会员价:
							<text>
								<text class="icon">￥</text>{{item.goods_vip_price?item.goods_vip_price:item.vip_price}}
							</text>
						</text>
					</view>
					<view class="numbar flex-cb">
						{{item.goods_attribute?item.goods_attribute:item.sx}}
					</view>
				</view>
			</view>
		</view>
		<!-- <view class="div flex-cb">
			<text>运费</text>
			<text>￥{{}</text>
		</view> -->
		<view class="colse ">
			<view class="flex-cb" @click="iscolse = 0, isVoucher = false">
				<text>无优惠：</text>
				<view class="cuIcon-squarecheckfill" v-if="iscolse ==0"></view>
				<text class="cuIcon" v-else></text>
			</view>
			<!-- v-if="vipdata.point != 0" -->
			<view class="flex-cb" @click="iscolse =1 ,isVoucher = false">
				<text>积分最多抵扣：
					<text class="num">
						<text class="icon">￥</text>{{vipdata.point_price||0}}</text>
				</text>
				<view class="cuIcon-squarecheckfill" v-if="iscolse ==1"></view>
				<text class="cuIcon" v-else></text>
			</view>
			<view class="flex-cb " @click="handleColse">
				<view class="flex align-center" style="margin: 0;">
					<image src="/static/vip.png" style="width: 34rpx;height: 40rpx;margin-right: 10rpx;" mode="">
					</image>
					<text>会员价：
						<text class="num"><text class="icon">￥</text>{{vipdata.vip_price}}</text>
					</text>
				</view>
				<text class="cuIcon-squarecheckfill" v-if="iscolse ==2"></text>
				<text class="cuIcon" v-else></text>
			</view>
			<view class="flex-cb " v-if="voucherList.length!=0" @click="isVoucherChange()">
				<view class="flex align-center" style="margin: 0;">
					<!-- <image src="/static/vip.png"  style="width: 34rpx;height: 40rpx;margin-right: 10rpx;" mode=""></image> -->
					<text>抵用券
						<!-- <text class="num"><text class="icon"></text>{{voucherList[0].amount}}</text> -->
					</text>
				</view>
				<text class="cuIcon-squarecheckfill" v-if="isVoucher && iscolse == 3"></text>
				<text class="cuIcon" v-else></text>
			</view>
		</view>
		<view class="colse flex-c" style="min-height: auto;font-weight: bold;" v-if="vipdata.points">
			<text>
				<text class="xdf">下单返</text>
				<text class="num">：</text>
				<text class="num num2">{{vipdata.points}}</text>积分
			</text>
		</view>
		<view class="colse flex-c" style="min-height: auto;font-weight: bold;margin-bottom: 140rpx;"
			v-if="vipdata.coupon_gift_number != 0">
			<text>
				<text class="xdf">下单返</text>
				<text class="num">：</text>
				<text class="num num2">{{vipdata.coupon_gift_number}}</text>张抵用券
			</text>
		</view>
		<view class="foot flex-cb">
			<view class="money flex align-center">
				<text style="font-size: 30rpx;">￥</text>
				<text
					style="font-size: 40rpx;">{{iscolse==0?vipdata.price:iscolse==1?vipdata.jifen_price||vipdata.price:vipdata.vip_price}}</text>
				<!-- <text style="font-size: 24rpx;margin-left: 20rpx;">原价：{{vipdata.price}}</text> -->
			</view>
			<view class="button flex-c" @click="pay">去结算</view>
		</view>
	</view>
</template>

<script>
	import {
		getGoodVoucherApi
	} from "@/common/api.js"
	export default {
		data() {
			return {
				// 抵用券信息
				voucher: "",
				voucherIds: [],
				voucherId: null,
				url: '',
				mch_id: '',
				main_id: '', //店铺主营类型id
				shop: {}, //店铺信息
				tab: 0,
				iscolse: 0, //0无优惠1积分抵扣 2会员价
				food: [],
				defaultAddress: {},
				time: '',
				payid: 0, //支付id
				id: 0, // 使用 marker点击事件 需要填写id
				title: 'map',
				covers: [{
					latitude: 39.909,
					longitude: 116.39742,
				}],
				vipdata: {
					vip_price: 0,
					price: 0,
					point: 0,
					points: 0, //赠送积分
					point_price: 0,
					jifen_price: 0,
					id: [],
					coupon_gift_number: 0
				},
				t: '',
				nocart: 0,
				voucherList: [], //现金券列表
				isVoucher: false, //是否使用现金券
				voucherPrice: '', //使用现金券 价格
				// 服务类型
				serverType:1,
			};
		},
		watch: {
			isVoucher(newValue, oldValue) {
				if (!newValue) {
					this.vipdata.price = (Number(this.vipdata.price) + this.voucher).toFixed(2)
					this.vipdata.jifen_price = (Number(this.vipdata.jifen_price) + this.voucher).toFixed(2)
					this.vipdata.vip_price = (Number(this.vipdata.vip_price) + this.voucher).toFixed(2)
				}
			}
		},
		onLoad(e) {
			this.shop = JSON.parse(e.shop)
			this.mch_id = this.shop.id
			this.serverType = this.shop.main.type
			console.log(this.shop, '当前商家=====');
			this.main_id = this.shop.main_id
			console.log(this.main_id, '类型');
			this.covers.latitude = this.shop.lat
			this.covers.longitude = this.shop.lng
			this.url = this.$base
			if (Array.isArray(JSON.parse(e.data))) {
				this.food = JSON.parse(e.data)
				for (let i = 0; i < this.food.length; i++) {
					this.vipdata.vip_price += parseFloat(this.food[i].goods_vip_price) * parseFloat(this.food[i].number)
					this.vipdata.price += parseFloat(this.food[i].goods_price) * parseFloat(this.food[i].number)
					this.vipdata.point = this.food[i].goods_need_point //100积分抵扣
					this.vipdata.point_price += (parseFloat(this.food[i].goods_price) - parseFloat(this.food[i]
						.goods_point_price)) * parseFloat(this.food[i].number)
					this.vipdata.id[i] = this.food[i].id
					this.vipdata.points = parseInt(this.vipdata.points) + parseInt(this.food[i].goods_give_point)
					this.vipdata.coupon_gift_number += this.food[i].goods.coupon_gift_number
				}
				this.food.forEach(item => {
					this.getGoodVoucher(item.goods_id)
				})
			} else {
				this.nocart = 1
				this.food = [JSON.parse(e.data)]
				this.vipdata.vip_price = parseFloat(this.food[0].vip_price) * parseFloat(this.food[0].number)
				this.vipdata.price = parseFloat(this.food[0].price) * parseFloat(this.food[0].number)
				this.vipdata.point = this.food[0].point_100
				this.vipdata.point_price = parseFloat(this.food[0].point_price) * parseFloat(this.food[0].number)
				this.vipdata.id[0] = this.food[0].id
				this.vipdata.points = this.food[0].point //赠送积分
				this.vipdata.coupon_gift_number = this.food[0].coupon_gift_number
				this.food.forEach(item => {
					this.getGoodVoucher(item.id)
				})
			}
			this.vipdata.jifen_price = parseFloat(this.vipdata.price) - parseFloat(this.vipdata.point_price)
			this.vipdata.jifen_price = this.$utils.changeTwoDecimal_f(this.vipdata.jifen_price)
			this.vipdata.vip_price = this.$utils.changeTwoDecimal_f(this.vipdata.vip_price)
			this.vipdata.price = this.$utils.changeTwoDecimal_f(this.vipdata.price)

		},
		onShow() {
			this.t = this.$utils.getdeta()
			this.$api.default_address().then(res => {
				this.defaultAddress = res.data
				if (res.data == null) {
					uni.showModal({
						title: '提示',
						content: '您还没有设置收货地址，是否前往设置',
						success(res) {
							if (res.confirm) {
								uni.navigateTo({
									url: '/pageC/mine/Function list/address'
								})
							}
						}
					})
				}
			})
		},
		methods: {
			godizhi() {
				uni.navigateTo({
					url: '/pageC/mine/Function list/address'
				})
			},
			// 提示时间
			tab1() {
				this.tab = 1
				if (this.time == '' && this.tab == 1) {
					this.$utils.tips('请填写自提时间')
					return
				}
			},
			// 获取现金券
			getGoodVoucher(id) {
				getGoodVoucherApi({}, id, false).then(res => {
					this.voucherList = [...this.voucherList, ...res.data]
					let obj = {};
					this.voucherList = this.voucherList.reduce((cur, next) => {
						obj[next.coupon_id] ? '' : obj[next.coupon_id] = true && cur.push(next)
						return cur;
					}, [])
					if (this.nocart == 0) {
						this.voucherList.forEach(item => {
							this.voucherIds.push(item.id)
						})
						this.voucherIds = [...new Set(this.voucherIds)]
					} else {
						this.voucherId = this.voucherList[0].id
					}


				})
			},
			// 是否使用现金券
			isVoucherChange() {
				this.isVoucher = !this.isVoucher
				this.iscolse = 3

				let obj = {};
				this.voucherList = this.voucherList.reduce((cur, next) => {
					obj[next.goods_id] ? '' : obj[next.goods_id] = true && cur.push(next)
					return cur;
				}, [])
				let arr = []
				let str = 0
				console.log(this.voucherList, 'this.voucherList===');
				console.log(this.food, 'this.food===');
				if (this.nocart == 0) {
					this.voucherList.forEach(item => {
						this.food.forEach(ele => {
							if (item.goods_id === ele.goods_id) {
								arr.push(ele)
							}
						})
					})
					arr.forEach(item => {
						str += Number(item.goods_price)
					})
				} else {
					this.voucherList.forEach(item => {
						this.food.forEach(ele => {
							if (item.goods_id === ele.id) {
								arr.push(ele)
							}
						})
					})
					arr.forEach(item => {
						str += Number(item.price)
					})
				}

				this.voucher = str

				if (this.isVoucher) {
					this.vipdata.price = (Number(this.vipdata.price) - str).toFixed(2)
					this.vipdata.jifen_price = (Number(this.vipdata.jifen_price) - str).toFixed(2)
					this.vipdata.vip_price = (Number(this.vipdata.vip_price) - str).toFixed(2)
				} else {
					this.vipdata.price = (Number(this.vipdata.price) + str).toFixed(2)
					this.vipdata.jifen_price = (Number(this.vipdata.jifen_price) + str).toFixed(2)
					this.vipdata.vip_price = (Number(this.vipdata.vip_price) + str).toFixed(2)
				}

				if (this.vipdata.price < 0) {
					this.vipdata.price = 0
				}

				if (this.vipdata.jifen_price < 0) {
					this.vipdata.jifen_price = 0
				}

				if (this.vipdata.vip_price < 0) {
					this.vipdata.vip_price = 0
				}
			},
			handleColse() {
				this.iscolse = 2
				this.isVoucher = false
				this.$api.user().then(res => {
					if (res.data.vip_expire_time == null) {
						this.getVip()
					} else {
						// 
						let t = new Date(res.data.vip_expire_time.replace(/-/g, "/")).getTime() / 1000; //到期时间戳
						let newt = Date.parse(new Date()) / 1000 //当前时间戳
						console.log(t);
						if (t < newt) {
							this.getVip(1)
						}
					}
				})
			},
			handleTime(e) {
				this.time = e.detail.value
				console.log(this.time);
			},
			geto() {
				uni.navigateTo({
					url: '/pageB/mine/Function list/address'
				})
			},
			getVip(i) {
				uni.showModal({
					title: '提示',
					content: i == 1 ? '您的会员已到期，是否前往续费' : '您还不是会员无法享受会员价，是否前往开通',
					success(res) {
						if (res.confirm) {
							uni.navigateTo({
								url: '/pageC/mine/Function list/vip'
							})
						}
					}
				})
			},
			pay() {
				let that = this
				if (this.shop.is_open == 0) {
					this.$utils.tips('店铺已经打烊了~')
					return
				}
				if (this.nocart == 0) { //是购物车进来结算
					if (this.tab == 0) {
						if (!this.defaultAddress) {
							this.$utils.tips('请设置收货地址后重试')
							return
						}
						if (this.serverType == 3) { // 物流配送
							this.$api.cart_orders({
								type: 1,
								cart_ids: this.vipdata.id, //商品id集
								discount_method: this.iscolse,
								address_id: this.defaultAddress.id,
								user_coupon_ids: this.voucherIds
							}, this.mch_id, 1).then(res => {
								if (res.code == 200001) {
									if (res.data.is_0_buy == 1) {
										uni.showToast({
											title: "下单成功",
											icon: "none",
											duration: 500
										})
										setTimeout(() => {
											that.deteles() //删除购物车商品
											uni.navigateBack({
												delta: 2
											})
										}, 800)
										return
									}
									this.payzf(res.data.order_id)
								}
								if (res.code == 100407) {
									this.$utils.tips('你的积分不足')
									return
								}
								if (res.code == 100403) {
									this.getVip()
								}
							})

						} else { //商家配送
							this.$api.cart_orders({
								type: 3,
								cart_ids: this.vipdata.id, //商品id集
								discount_method: this.iscolse,
								address_id: this.defaultAddress.id,
								user_coupon_ids: this.voucherIds
							}, this.mch_id, 1).then(res => {
								if (res.code == 200001) {
									if (res.data.is_0_buy == 1) {
										uni.showToast({
											title: "下单成功",
											icon: "none",
											duration: 500
										})
										setTimeout(() => {
											that.deteles() //删除购物车商品
											uni.navigateBack({
												delta: 2
											})
										}, 800)
										return
									}
									this.payzf(res.data.order_id)
								}
								if (res.code == 100407) {
									this.$utils.tips('你的积分不足')
									return
								}
								if (res.code == 100403) {
									this.getVip()
								}
							})
						}
					} else { //自提
						if (this.time == '') {
							this.$utils.tips('请填写自提时间')
							return
						}
						this.$api.cart_orders({
							type: 2,
							self_pick_time: this.t + ' ' + this.time, //自提时间
							cart_ids: this.vipdata.id, //商品id集
							discount_method: this.iscolse,
							user_coupon_ids: this.voucherIds
						}, this.mch_id, 1).then(res => {
							if (res.code == 200001) {
								if (res.data.is_0_buy == 1) {
									uni.showToast({
										title: "下单成功",
										icon: "none",
										duration: 500
									})
									setTimeout(() => {
										that.deteles() //删除购物车商品
										uni.navigateBack({
											delta: 2
										})
									}, 800)
									return
								}
								this.payzf(res.data.order_id)
							}
							if (res.code == 100407) {
								this.$utils.tips('你的积分不足')
								return
							}
							if (res.code == 100403) {
								this.getVip()
							}
						})
					}
				} else { //不是购物车进来结算
					if (this.tab == 0) {
						if (!this.defaultAddress) {
							this.$utils.tips('请设置收货地址后重试')
							return
						}
						if (this.serverType == 3) { //物流配送
							this.$api.orders_merchants({
								type: 1,
								goods_id: this.vipdata.id[0], //商品id
								number: this.food[0].number,
								spec_name: this.food[0].specname,
								spec_item_name: this.food[0].spec,
								attribute_name: this.food[0].sx,
								discount_method: this.iscolse,
								address_id: this.defaultAddress.id,
								user_coupon_id: this.voucherId
							}, this.mch_id, 1).then(res => {
								if (res.code == 812402) {
									uni.showToast({
										title: res.message,
										icon: 'none'
									})
								}
								if (res.code == 200001) {
									if (res.data.is_0_buy == 1) {
										uni.showToast({
											title: "下单成功",
											icon: "none",
											duration: 500
										})
										setTimeout(() => {
											that.deteles() //删除购物车商品
											uni.navigateBack({
												delta: 2
											})
										}, 800)
										return
									}
									this.payzf(res.data.order_id)
								}
								if (res.code == 100407) {
									this.$utils.tips('你的积分不足')
									return
								}
								if (res.code == 100403) {
									this.getVip()
								}
							})
						} else { // 商家配送
							this.$api.orders_merchants({
								type: 3,
								goods_id: this.vipdata.id[0], //商品id
								number: this.food[0].number,
								spec_name: this.food[0].specname,
								spec_item_name: this.food[0].spec,
								attribute_name: this.food[0].sx,
								discount_method: this.iscolse,
								address_id: this.defaultAddress.id,
								user_coupon_id: this.voucherId
							}, this.mch_id, 1).then(res => {
								console.log(res);
								if (res.code == 812402) {
									uni.showToast({
										title: res.message,
										icon: 'none'
									})
								}
								if (res.code == 200001) {
									if (res.data.is_0_buy == 1) {
										uni.showToast({
											title: "下单成功",
											icon: "none",
											duration: 500
										})
										setTimeout(() => {
											that.deteles() //删除购物车商品
											uni.navigateBack({
												delta: 2
											})
										}, 800)
										return
									}
									this.payzf(res.data.order_id)
								}
								if (res.code == 100407) {
									this.$utils.tips('你的积分不足')
									return
								}
								if (res.code == 100403) {
									this.getVip()
								}
							})

						}
					} else { //自提
						if (this.time == '') {
							this.$utils.tips('请填写自提时间')
							return
						}
						this.$api.orders_merchants({
							type: 2,
							self_pick_time: this.t + ' ' + this.time, //自提时间
							goods_id: this.vipdata.id[0], //商品id
							number: this.food[0].number,
							spec_name: this.food[0].specname,
							spec_item_name: this.food[0].spec,
							attribute_name: this.food[0].sx,
							discount_method: this.iscolse,
							user_coupon_id: this.voucherId
						}, this.mch_id, 1).then(res => {
							if (res.code == 812402) {
								uni.showToast({
									title: res.message,
									icon: 'none'
								})
							}
							if (res.code == 200001) {
								if (res.data.is_0_buy == 1) {
									uni.showToast({
										title: "下单成功",
										icon: "none",
										duration: 500
									})
									setTimeout(() => {
										that.deteles() //删除购物车商品
										uni.navigateBack({
											delta: 2
										})
									}, 800)
									return
								}
								this.payzf(res.data.order_id)
							}
							if (res.code == 100407) {
								this.$utils.tips('你的积分不足')
								return
							}
							if (res.code == 100403) {
								this.getVip()
							}
						})
					}
				}

			},
			// 清空购物车
			deteles() {
				this.$api.cartsClear({
					type: 1
				}, this.shop.id, 1).then(res => {
					console.log(res);
					if (res.code == 200001) {
						// this.money = 0.00
						this.getcart(this.shop.id)
						// this.isall = 0
					}
				})
			},
			payzf(id) {
				this.$api.cart_orders_pay({}, id, 1).then(res => {
					let that = this
					uni.requestPayment({
						provider: 'wxpay',
						timeStamp: res.data.timeStamp,
						nonceStr: res.data.nonceStr,
						package: res.data.package,
						signType: res.data.signType,
						paySign: res.data.paySign,
						success: (r) => {
							console.log(r, 3);
							that.$api.cart_orders_notify({}, id, 1).then(res => {
								console.log(res, '4');
								if (res.code == 200001) {
									uni.showToast({
										title: "下单成功",
										icon: "none"
									})
									that.deteles() //删除购物车商品
									uni.navigateBack({
										delta: 2,
										animationDuration: 500
									})
								}
							})
						},
						complete(err) {
							console.log(err);
						}
					})
				})
			},
			handlemap() { //导航
				console.log(11);
				const that = this
				uni.getLocation({
					type: 'gcj02', //返回可以用于uni.openLocation的经纬度
					success: function(res) {
						console.log(res);
						uni.openLocation({
							latitude: parseFloat(that.shop.lat), //维度
							longitude: parseFloat(that.shop.lng), //经度
							scale: 18, //缩放比例，范围5~18，默认为18
							name: that.shop.shop_province + that.shop.shop_city + that.shop
								.shop_district, //地址名称
							address: that.shop.shop_address + that.shop.shop_name, //地址详情
							success(res) {
								console.log(res);
							},
							fail(err) {
								console.log(err);
							}
						})
					},
					fail(err) {
						console.log(err);
					}
				});

			},
		}
	}
</script>

<style lang="scss">
	.bady {
		padding: 12rpx 20rpx;
	}

	.head {
		width: 706rpx;
		height: 320rpx;
		border-radius: 20rpx;

		.tab {
			margin-top: 12rpx;

			view {
				width: 364rpx;
				height: 68rpx;
				line-height: 68rpx;
				text-align: center;
				font-size: 30rpx;
				color: #333;
				background: rgba(28, 214, 153, .2);
				border-radius: 20rpx 24rpx 0px 0px;
			}

			.wl,
			.zt {
				height: 92rpx;
				padding-top: 24rpx;
				background: #fff;
				font-weight: bold;
				font-size: 36rpx;
				color: #1CD699;
			}
		}

		.address {
			margin-top: -12rpx;
			padding: 12rpx 31rpx 58rpx 22rpx;

			.name_phone {
				color: #2F2F2F;
				font-weight: bold;
				font-size: 36rpx;
				margin-top: 40rpx;

				.phone {
					margin-left: 17rpx;
					color: #969696;
					font-size: 30rpx;
				}

				.Add_address {
					margin-top: 20rpx;
					width: 547rpx;
					height: 40rpx;
					font-size: 28rpx;
					font-weight: bold;
					color: #333333;
					line-height: 40rpx;
				}
			}

			.icon {
				font-size: 40rpx;
				margin-top: 31rpx;
			}
		}
	}

	.head_1 {
		width: 706rpx;
		// height: 320rpx;
		border-radius: 0 0 20rpx 20rpx;
		margin: -12rpx auto;
		padding: 26rpx 20rpx 11rpx 20rpx;

		.head_div {
			height: 100%;

			.name_people {
				margin-left: 20rpx;
				height: 84rpx;
				margin-top: 17rpx;

				.left {
					width: 220rpx;
					border-right: solid 1rpx #999;

					.name_phone {
						color: #1CD699;
					}
				}

				.right {
					margin-left: 28rpx;
				}

				.people {
					font-size: 24rpx;
					color: #999;
					height: 33rpx;
				}

				.name_phone {
					font-size: 26rpx;
					font-weight: bold;
					color: #333;
					height: 42rpx;
				}
			}
		}

		.address {
			width: 442rpx;
			height: 88rpx;
			font-size: 28rpx;
			font-family: PingFang SC-Bold, PingFang SC;
			font-weight: bold;
			color: #333333;
			line-height: 48rpx;
		}

		map {
			width: 172rpx;
			height: 172rpx;
			border-radius: 10rpx;
		}
	}

	.main {
		width: 706rpx;
		height: auto;
		background: #FFFFFF;
		border-radius: 20rpx;
		margin: auto;
		padding: 0 20rpx 0 27rpx;

		.item {
			padding: 26rpx 0 34rpx 0;
			border-bottom: 1rpx solid #EBEBEB;

			image {
				width: 136rpx;
				height: 136rpx;
				border-radius: 10rpx;
			}

			.text_div {
				flex: 1;
				margin-left: 19rpx;
				font-size: 28rpx;
				color: #333333;

				.name {
					height: 40rpx;

					.text {
						height: 40rpx;
						font-weight: bold;
						overflow: hidden;
						text-overflow: ellipsis;
					}

					.tuikuan {
						font-size: 30rpx;
						font-weight: 500;
						color: #1CD699;
					}
				}

				.pic {
					height: 40rpx;
					text-align: right;
					margin-top: 20rpx;
					font-size: 28rpx;

				}

				.jifen {
					color: #1CD699;
					width: 191rpx;
					text-align: right;
					font-size: 30rpx;
					margin-top: 7rpx;

					text {
						font-size: 40rpx;
						color: #FF2E2E;

						.icon {
							font-size: 22rpx;
						}
					}
				}

				.numbar {
					text {
						width: 191rpx;
						height: 33rpx;
						margin-top: 5rpx;
						white-space: nowrap;
						font-size: 30rpx;
						font-weight: bold;
						color: #FF2E2E;
					}

					.num_x {
						font-size: 30rpx;
						font-weight: 500;
						color: #999;
					}

				}

				.vip {
					color: #FF2E2E;
					text-align: right;

					text {
						font-size: 40rpx;

						.icon {
							font-size: 22rpx;
						}
					}
				}

			}
		}

		.item:nth-last-of-type(1) {
			border: none;
		}

		.span {
			padding-top: 24rpx;

			.text_span {
				font-size: 30rpx;
				color: #666;
				padding: 0 25rpx;
				margin-bottom: 20rpx;
			}

			image {
				width: 189rpx;
				height: 189rpx;
				margin-right: 15rpx;
			}
		}

	}

	.div {
		width: 706rpx;
		height: 108rpx;
		background: #FFFFFF;
		border-radius: 20rpx;
		margin-top: 20rpx;
		padding: 0 30rpx 0 24rpx;
		font-size: 30rpx;
		color: #2F2F2F;
		font-weight: bold;
	}

	.colse {
		margin-top: 20rpx;
		width: 706rpx;
		min-height: 170rpx;
		background: #FFFFFF;
		border-radius: 20rpx;
		padding: 30rpx 23rpx;

		.xdf {
			text-indent: 30;
			letter-spacing: 6rpx;
			font-size: 30rpx;
		}

		.num {
			color: #FF2E2E;
			font-size: 38rpx;
		}

		.icon {
			font-size: 26rpx;
		}

		.num2 {
			font-size: 40rpx;
			padding: 0 20rpx;
		}

		view {
			height: 40rpx;
			margin-bottom: 33rpx;
			font-size: 30rpx;
			color: #2F2F2F;
			font-weight: bold;

			.cuIcon {
				margin: 0;
				width: 40rpx;
				height: 40rpx;
				background: #F0F0F0;
				border-radius: 6rpx;
			}

			.cuIcon-squarecheckfill {
				font-size: 44rpx;
				color: #1CD699;
				font-weight: 100;
			}
		}
	}

	.foot {
		width: 710rpx;
		height: 100rpx;
		color: #fff;
		position: fixed;
		bottom: 22rpx;
		left: 20rpx;

		.money {
			flex: 1;
			height: 100%;
			padding-left: 45rpx;
			border-radius: 50rpx 0 0 50rpx;
			background: #000;
		}

		.button {
			width: 168rpx;
			height: 100%;
			background: #1CD699;
			border-radius: 0 50rpx 50rpx 0;
			font-size: 30rpx;
		}
	}
</style>